#ifndef WF_DEFULT_H
#define WF_DEFULT_H

#include "pf_previewactioninterface.h"
#include "gui_export.h"

/**
 * This action class can handle user events to select all entities.
 *
 */
class GUI_EXPORT WF_Default : public PF_PreviewActionInterface {
    Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        Neutral,        /**< we don't know what we do yet.  */
        Dragging,       /**< dragging (either an entity or the
        		                     first part of a selection window) */
        SetCorner2,     /**< Setting the 2nd corner of a selection window. */
        Moving,         /**< Moving entities (drag'n'drop) */
        MovingRef       /**< Moving a reference point of one or more selected
        		                     entities */
    };

public:
    WF_Default(PF_Container& container,
                     PF_GraphicView& graphicView);
    virtual ~WF_Default();
	
	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

    virtual LX_Define::ActionType rtti() {
        return LX_Define::ActionDefault;
    }

    virtual void init(int status=0);

    virtual void trigger();

    virtual void keyPressEvent(QKeyEvent* e);
    virtual void keyReleaseEvent(QKeyEvent* e);

    virtual void mouseMoveEvent(QMouseEvent* e);
    virtual void mousePressEvent(QMouseEvent* e);
    virtual void mouseReleaseEvent(QMouseEvent* e);

    virtual void commandEvent(PF_CommandEvent* e);
    virtual QStringList getAvailableCommands();

    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

protected:
    PF_Vector v1;
    PF_Vector v2;
	LX_Define::SnapRestriction restrBak;

};

#endif
